<html>
<head>
    <meta charset="UTF-8">
    <title>流程基本信息修改</title>
    <link id="easyuiTheme" href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
    <link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
    <link href="../../static/css/esaas-easyui-edit.css" rel="stylesheet" type="text/css"/>
    <script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
    <script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
    <script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
    <script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
    <script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
    <script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
    <script src="../../ffres/dict/all.js" type="text/javascript"></script>
    <a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<body class="easyui-layout">

<form id="ff" method="post">
    <div class="esaas-info-title">流程基本信息信息</div>
    <table class="esaas-info-edit-table">
        <tr hidden="true">
            <td width="15%" align="right">流程标识：</td>
            <td width="35%" hidden="true"><input class="easyui-textbox" type="text"
                                                 name="bpmId" data-options="required:false"
                                                 style="width: 100%; height: 25px;"></input></td>
        </tr>
        <tr>
            <td width="15%" align="right">流程编号：</td>
            <td width="35%" ><input class="easyui-textbox" type="text"
                                    id="bpmCode" name="bpmCode" data-options="required:false"
                                    style="width: 100%; height: 25px;"></input></td>
            <td width="15%" align="right">流程类型：</td>
            <td width="35%"><select class="easyui-combobox"
                                    id="bpmType" name="bpmType"
                                    style="width: 100%; height: 25px;"
                                    readonly="true"
                                    data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:BPM_TYPE" >
            </select></td>
        </tr>
        <tr>
            <td width="15%" align="right">流程名称：</td>
            <td width="35%"><input class="easyui-textbox" type="text"
                                   name="bpmName" data-options="required:false"
                                   style="width: 100%; height: 25px;"></input></td>
            <td width="15%" align="right" id="bingfa">任务并发数：</td>
            <td width="35%" id="bingfaValue" ><input class="easyui-textbox" type="text"
                                                     id="equallyTaskAmount" name="equallyTaskAmount" data-options="required:false"
                                                     style="width: 100%; height: 25px;"></input></td>
        <tr>
            <td width="15%" align="right">是否允许重跑：</td>
            <td width="35%"><select class="easyui-combobox"
                                    id="isRunAgain" name="isRunAgain"
                                    style="width: 100%; height: 25px;"
                                    data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:STD_PUB_YN">
            </select></td>
            <td width="15%" align="right">子系统代码：</td>
            <td width="35%"><input class="easyui-textbox" type="text"
                                   id="subsCode" name="subsCode" data-options="required:true"
                                   style="width: 100%; height: 25px;"></input></td>
        </tr>
        <tr hidden="true">
            <td width="15%" align="right" hidden="true">创建人：</td>
            <td width="35%" hidden="true"><input class="easyui-textbox" type="text"
                                                 name="createUser" data-options="required:false"
                                                 style="width: 100%; height: 25px;"></input></td>
            <td width="15%" align="right">创建时间：</td>
            <td width="35%"><input class="easyui-textbox" type="text"
                                   name="createTime" data-options="required:false"
                                   style="width: 100%; height: 25px;"></input></td>
        </tr>
        <tr hidden="true">
            <td width="15%" align="right">最后更新人：</td>
            <td width="35%"><input class="easyui-textbox" type="text"
                                   name="lastUpdateUser" data-options="required:false"
                                   style="width: 100%; height: 25px;"></input></td>
            <td width="15%" align="right">最后更新时间：</td>
            <td width="35%"><input class="easyui-textbox" type="text"
                                   name="lastUpdateTime" data-options="required:false"
                                   style="width: 100%; height: 25px;"></input></td>
        </tr>
    </table>
</form>
<div style="text-align:center;padding:15px">
    <a href="javascript:void(0)" class="easyui-linkbutton " iconCls="icon-ok" onclick="submitForm()" style="width:90px">&nbsp;保&nbsp;存&nbsp;</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
</div>
</div>
<script>


    $(function() {
        addTitle("修改");

        var bpmId = $.getUrlParam('bpmId');
        $.restfulGet('../../api/bpm/base/info/' + bpmId,null,function(data){
            $('#ff').form('load', {
                bpmId : data.rows.bpmId,
                bpmName : data.rows.bpmName,
                bpmCode:data.rows.bpmCode,
                bpmType:data.rows.bpmType,
                equallyTaskAmount : data.rows.equallyTaskAmount,
                isRunAgain : data.rows.isRunAgain,
                subsCode : data.rows.subsCode,
                createUser : data.rows.createUser,
                createTime : data.rows.createTime,
                lastUpdateUser : data.rows.lastUpdateUser,
                lastUpdateTime : data.rows.lastUpdateTime
            });
        });
    });
    function submitForm() {
        if (!$('#ff').form('validate'))
            return;
        var jsonData = $("#ff").serializeJson();
        $.restfulPut('../../api/bpm/base/info', jsonData, function(data) {
            window.parent.reloadList();
        });
    };
    function closeForm(){
        window.parent.JLEUtil.closewin();
    }
</script>
</body>
</html>
